<h1>Books are coming soon!</h1>

<h1>Listing Books</h1>
<%= form_tag :books do %>
    <%= submit_tag("newbook") %>
<% end %>
<table>
    <tr>
        <th>Title</th>
        <th>Summary</th>
        <th></th>
        <th></th>
        <th></th>
    </tr>

    <% @books.each do |book| %>
        <tr>
            <td><%= book.name %></td>
            <td><%= book.author %></td>
            <td><%= link_to "Show", book %></td>
            <td><%= link_to "update", book %></td>
            <td><%= link_to "Edit", edit_book_path(book) %></td>
            <td><%= link_to "Remove", book, method: :delete, data: { confirm: "Are you sure?" } %></td>
        </tr>
    <% end %>
</table>

<br>

<%= link_to "New book", new_book_path %>